#include "maker_base.h"
// uint8_t tap1[] = {0x2a, 0xab, 0x43, 0xf6, 0x03, 0xb4};
// uint8_t tap0[] = {0xbe, 0x26, 0x55, 0xa5, 0xce, 0x34};



void test1()
{
    // 打开tap1网卡接口
    printf("\033[32m[info]\033[0mplease enter tap interface name (tap0/tap1):\n");
    
    //此代码需要测试
    unsigned char tap_name[6] = {0};
    int read_count = read(0,tap_name,6);
    for (int i = 0; i < read_count; i++)
    {
        /* code */
        printf("%#x ",tap_name[i]);
    }
    printf("\n");
    printf("%d\n",read_count);

}
void test2(){
    void * a = (void *)1;
    a=a+1;
    printf("%p\n",a);
    a++;
    printf("%p\n",a);
    a+=1;
    printf("%p\n",a);

}
void test3(){
    //这是错误的
    // void * a = (void *)1;
    // void * b = &a[5];
    // printf("%p\n",b);
    // void * c = &a[6];
    // printf("%p\n",c);
    // void * d = &a[7];
    // printf("%p\n",d);

}

void test4(){

    unsigned char a[6] = "hello\n";
    for (int i = 0; i < 10; i++)
    {
        /* code */
        printf("%d ",a[i]);
    }
    printf("\n");
     

}
void test5(){
    uint16_t * a = (uint16_t *)1;
    printf("%p\n",a);
    a = a+1;
    printf("%p\n",a);
}
typedef void (*a)();
void test6(){
    printf("%ld\n",sizeof(a));
    printf("%ld\n",sizeof(size_t));
}
void test7(){
    
}
int main(){
    test6();
    return 0;
}